package com.ssm.dao;

import com.ssm.pojo.Customer;
import com.ssm.pojo.Enter;
import com.ssm.pojo.Fee;
import com.ssm.pojo.House;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CustomerDao {
    //查询所有客户
    List<Customer> queryAllCustomers();

    //通过姓名查找客户
    Customer queryCustomerByName(String name);

    //查询房间信息  (house表)
    List<House> queryAllHouses();

    //查询想要入住的房间
    House queryOneHouse(String name);

    //根据card查询 用户信息
    Customer queryCustomerByCard(String card);

    //办理入住
    //1.预订房间的客户信息录入  addCustomer()
    //添加入住客户信息
    int addCustomer(Customer customer);

    //2.在账单上添加相关信息
    int addFee(Fee fee);

    //3.house数量减一
    //预订后对应的房间数量减一
    int reduceHouse(House house);

    //4.预订房间录入信息  (enter表)
    int toEnter(Enter enter);

    //5.向fee中添加enterId
    int addEnterId(@Param("enterId") int enterId, @Param("feeId") int feeId);


    //退订房间
    //根据房间id
    int checkOut(int houseId);

}
